@extends('huweize.layouts.userHome')
@section('title','个人空间-阅文作家专区')
@section('main')
    @if(count($errors))
        <script>
            alert('{!! $errors->first('text') !!}');
        </script>
        @endif
    <div class="col-md-12 vipHeader">
        <h3>
            <span class="glyphicon glyphicon-user"></span>
            个人心情
        </h3>
    </div>
        <div class="col-md-12">
            <form action="" method="post">
                {{csrf_field()}}
                <textarea class="form-control" rows="5" name="text" id="BlogText"></textarea>
                <input type="submit" class="btn btn-info blog_push" value="发布">
            </form>
        </div>
    <div class="BlogWrap">

        <ul id="consultList">

            @foreach($sum as $k)
                <li data-msgid="1848127">
                    <div class="msgText">

                            <div id="Blog-box-one">
                              @if($k->icon)
                                    <img src="{{asset('image/writer/'.$k->icon)}}" alt="" style="height:70px;width:70px;border-radius:50px;float:left;">
                                @else
                                    <img src="{{asset('image/public.jpg')}}" alt="" style="height:70px;width:70px;border-radius:50px;float:left;">
                                @endif
                            </div>
                            <div id="Blog-box-two">
                                <p class="default" style="margin-top: 20px">{{date('Y-m-d H:i:s',$k->addtime)}}</p>
                                <em id="blog-Text"><b>{{$k->nickname}}:</b>{{$k->text}}</em>
                                <div class="reply-content">
                                <p class="btn fr">
                                    <a data-node="deleteBtn" data-msgid="1848127" href="{{url('huweize/home/weblog/del/'.$k->id)}}" class="btn btn-info">删除</a>
                                </p>
                            </div>
                            </div>
                    </div>
                </li>
            @endforeach
        </ul>
        <div class="new_links">
            @if(!empty($sum))
                {{$sum->links()}}
            @endif
        </div>

    </div>




@endsection